From 442fa8d9723ff320993bd4a869c7ec1258c45218 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 9 Mar 2023 15:42:16 -0500 Subject: [PATCH] filerchooser: Show Recent files in inverse order When looking at Recent files in the file chooser, it makes more sense to show the recent files on top. This commit flips the sort order for that case. --- gtk/gtkfilechooserwidget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 3a0dc6e41b..142daf6e2d 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -7110,6 +7110,10 @@ recent_sort_func (gconstpointer a, result = time_sort_func (a, b, user_data); + /* Recent files should show most recently changed items first + */ + result = -result; + if (result == GTK_ORDERING_EQUAL) result = name_sort_func (a, b, user_data); -- 2.30.2